package com.wtwd.campus.jdzc.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wtwd.campus.entity.Teacher;
import com.wtwd.campus.model.TeacherQueryModel;
import com.wtwd.campus.model.vo.TeacherVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zdl
 * @since 2021-07-08
 */
@Mapper
public interface JdzcTeacherMapper extends BaseMapper<Teacher> {

    IPage<TeacherVO> queryList(@Param("page") Page page, @Param("query") TeacherQueryModel teacherQueryModel);

    int insertBatch(@Param("teachers") List<TeacherVO> teachers);

    Teacher getTeacherByPhone(@Param("phone") String phone);

    String getClassesMessByUserId(@Param("userId") Integer userId);

    List<Map<String, Object>> getClassNameByClassIdList(@Param("list") List<Integer> classIdList);

    String getTeacherNameByUserId(@Param("userId") Integer userId);
}
